<template>
	<view class="">
		<view style="height: 40px"></view>
		<view v-if="list&&list.length>0" class="o-plr">
			<view v-for="(item,index) in list" :key="index" @click="goLink()" class="c-bg-f o-mt-s o-p c-line-17 l-fjb c-r-l">
				<view class="l-fa">
					<view class="l-fjb">
						<view class="l-f1">
							计划日期：{{item.startTime}}
						</view>
						<view class="l-f1">
							完成日期：{{item.completeTime}}
						</view>
					</view>
					<view class="l-fjb">
						<view class="l-f1">
							维保单位：{{item.serveCorpName}}
						</view>
						<view class="l-f1">
							维保人：{{item.serveUserName}}
						</view>
					</view>
				</view>
				<u-icon name="arrow-right" color="#8b8b8b" size="32"></u-icon>
			</view>
			<load-more :status="status"></load-more>
		</view>
		<view v-else>
			<view style="margin-top: 100rpx;">
				<u-empty text="暂无数据" mode="list"></u-empty>
			</view>
		</view>
	</view>
</template>

<script>
	import loadMore from '@/components/load-more.vue'
	export default {
		name: 'record',
		data() {
			return {
				status: 'nomore'
			}
		},
		props: {
			current:{
				type:Number,
				default:0 //0保养，1维保
			}
		},
		components:{loadMore},
		computed:{
			tabs: vm => vm.$store.getters.tabs,
			list: vm => vm.$store.getters.recordList
		},
		mounted() {
			console.log('list ==>',this.list)
		},
		methods: {
			//跳转页面
			goLink() {
				if(this.tabs == 1) {
					this.$Function.LinkTo('/pages/follow/repair-record')
				}else{
					this.$Function.LinkTo('/pages/follow/maintenance-record')
				}
			}
		}
	}
</script>

<style>
</style>
